package com.sunriz.motordrive.controller.photoThermal.motor;

import com.sunriz.motordrive.domain.DTO.MotorDebugDTO;
import com.sunriz.motordrive.domain.DTO.Result;
import com.sunriz.motordrive.server.photoThermal.Debug;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * ClassName: DebugController
 * Package: com.sunriz.motordrive.controller
 * Description:
 *
 * @Author BuTang
 * @Create 2024/5/20 14:19
 * @Version 1.0
 */
@Slf4j
@RestController
@RequestMapping("/debug")
public class DebugController {
    @Autowired
    Debug debug;

    @CrossOrigin
    @PostMapping("/setMotorModel")
    public Result setMotorModel(@RequestBody MotorDebugDTO modelAndValue){
        Result result = debug.setMotorModel(modelAndValue);
        return result;
    }
}
